package com.zl.staticProxy;

/**
 * 代理类
 * @ClassName: DrinkProxy
 * @author: suke
 * @since: 2021/8/2 14:13
 */
public class DrinkProxy implements  Drink{
    private Drink target; // 被代理的对象

    public DrinkProxy(Drink target) {
        this.target = target;
    }

    @Override
    public void drink() {
        target.drink();
        System.out.println("加糖....");
    }

    @Override
    public void fun() {
        target.drink();
        System.out.println("加糖....");
    }
}
